﻿using System;
using System.Data;
using System.Data.SqlClient;
using System.Collections.Generic;

namespace Sbook.Data
{
    public class BannerInfo
    {
        #region[Declare variables]
        private string _BId;
        private string _BLink;
        private string _BType;
        private string _BStatus;
        #endregion
        #region[Public Properties]
        public string BId { get { return _BId; } set { _BId = value; } }
        public string BLink { get { return _BLink; } set { _BLink = value; } }
        public string BType { get { return _BType; } set { _BType = value; } }
        public string BStatus { get { return _BStatus; } set { _BStatus = value; } }
        #endregion
        #region[Banner IDataReader]
        public BannerInfo BannerIDataReader(IDataReader dr)
        {
            Data.BannerInfo obj = new Data.BannerInfo();
            obj.BId = (dr["BId"] is DBNull) ? string.Empty : dr["BId"].ToString();
            obj.BLink = (dr["BLink"] is DBNull) ? string.Empty : dr["BLink"].ToString();
            obj.BType = (dr["BType"] is DBNull) ? string.Empty : dr["BType"].ToString();
            obj.BStatus = (dr["BStatus"] is DBNull) ? string.Empty : dr["BStatus"].ToString();
            return obj;
        }
        #endregion
    }
}